package com.ek.distmpl.dao.mapper;

import com.ek.distmpl.dao.model.Shop;
import com.ek.distmpl.dao.model.ShopExample;
import com.ek.distmpl.dao.model.ShopWithBLOBs;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface ShopMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ShopSqlProvider.class, method="countByExample")
    long countByExample(ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @DeleteProvider(type=ShopSqlProvider.class, method="deleteByExample")
    int deleteByExample(ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Delete({
        "delete from shop",
        "where shop_hid = #{shopHid,jdbcType=CHAR}"
    })
    int deleteByPrimaryKey(String shopHid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Insert({
        "insert into shop (shop_hid, shop_uid, ",
        "shop_name, hpic_name, ",
        "shop_phone, shop_commstar, ",
        "shop_status, shop_hpic, ",
        "shop_address, descshop)",
        "values (#{shopHid,jdbcType=CHAR}, #{shopUid,jdbcType=CHAR}, ",
        "#{shopName,jdbcType=VARCHAR}, #{hpicName,jdbcType=VARCHAR}, ",
        "#{shopPhone,jdbcType=VARCHAR}, #{shopCommstar,jdbcType=DOUBLE}, ",
        "#{shopStatus,jdbcType=INTEGER}, #{shopHpic,jdbcType=LONGVARBINARY}, ",
        "#{shopAddress,jdbcType=LONGVARCHAR}, #{descshop,jdbcType=LONGVARCHAR})"
    })
    int insert(ShopWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @InsertProvider(type=ShopSqlProvider.class, method="insertSelective")
    int insertSelective(ShopWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ShopSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="shop_hid", property="shopHid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="shop_uid", property="shopUid", jdbcType=JdbcType.CHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="hpic_name", property="hpicName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_phone", property="shopPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_commstar", property="shopCommstar", jdbcType=JdbcType.DOUBLE),
        @Result(column="shop_status", property="shopStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="shop_hpic", property="shopHpic", jdbcType=JdbcType.LONGVARBINARY),
        @Result(column="shop_address", property="shopAddress", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="descshop", property="descshop", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<ShopWithBLOBs> selectByExampleWithBLOBs(ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @SelectProvider(type=ShopSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="shop_hid", property="shopHid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="shop_uid", property="shopUid", jdbcType=JdbcType.CHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="hpic_name", property="hpicName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_phone", property="shopPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_commstar", property="shopCommstar", jdbcType=JdbcType.DOUBLE),
        @Result(column="shop_status", property="shopStatus", jdbcType=JdbcType.INTEGER)
    })
    List<Shop> selectByExample(ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Select({
        "select",
        "shop_hid, shop_uid, shop_name, hpic_name, shop_phone, shop_commstar, shop_status, ",
        "shop_hpic, shop_address, descshop",
        "from shop",
        "where shop_hid = #{shopHid,jdbcType=CHAR}"
    })
    @Results({
        @Result(column="shop_hid", property="shopHid", jdbcType=JdbcType.CHAR, id=true),
        @Result(column="shop_uid", property="shopUid", jdbcType=JdbcType.CHAR),
        @Result(column="shop_name", property="shopName", jdbcType=JdbcType.VARCHAR),
        @Result(column="hpic_name", property="hpicName", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_phone", property="shopPhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="shop_commstar", property="shopCommstar", jdbcType=JdbcType.DOUBLE),
        @Result(column="shop_status", property="shopStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="shop_hpic", property="shopHpic", jdbcType=JdbcType.LONGVARBINARY),
        @Result(column="shop_address", property="shopAddress", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="descshop", property="descshop", jdbcType=JdbcType.LONGVARCHAR)
    })
    ShopWithBLOBs selectByPrimaryKey(String shopHid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ShopSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") ShopWithBLOBs record, @Param("example") ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ShopSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") ShopWithBLOBs record, @Param("example") ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ShopSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Shop record, @Param("example") ShopExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @UpdateProvider(type=ShopSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(ShopWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update shop",
        "set shop_uid = #{shopUid,jdbcType=CHAR},",
          "shop_name = #{shopName,jdbcType=VARCHAR},",
          "hpic_name = #{hpicName,jdbcType=VARCHAR},",
          "shop_phone = #{shopPhone,jdbcType=VARCHAR},",
          "shop_commstar = #{shopCommstar,jdbcType=DOUBLE},",
          "shop_status = #{shopStatus,jdbcType=INTEGER},",
          "shop_hpic = #{shopHpic,jdbcType=LONGVARBINARY},",
          "shop_address = #{shopAddress,jdbcType=LONGVARCHAR},",
          "descshop = #{descshop,jdbcType=LONGVARCHAR}",
        "where shop_hid = #{shopHid,jdbcType=CHAR}"
    })
    int updateByPrimaryKeyWithBLOBs(ShopWithBLOBs record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table shop
     *
     * @mbg.generated Fri Mar 29 15:10:48 CST 2019
     */
    @Update({
        "update shop",
        "set shop_uid = #{shopUid,jdbcType=CHAR},",
          "shop_name = #{shopName,jdbcType=VARCHAR},",
          "hpic_name = #{hpicName,jdbcType=VARCHAR},",
          "shop_phone = #{shopPhone,jdbcType=VARCHAR},",
          "shop_commstar = #{shopCommstar,jdbcType=DOUBLE},",
          "shop_status = #{shopStatus,jdbcType=INTEGER}",
        "where shop_hid = #{shopHid,jdbcType=CHAR}"
    })
    int updateByPrimaryKey(Shop record);
}